package com.ujson.base.domain.repository;

import com.ujson.base.domain.entity.Aggregate;
import com.ujson.base.domain.entity.EntityDiff;
import com.ujson.base.domain.entity.Identifier;

public interface AggregateManager<T extends Aggregate<ID>, ID extends Identifier> {

    void attach(T aggregate);

    void detach(T aggregate);

    void merge(T aggregate);

    EntityDiff detectChanges(T aggregate) throws IllegalAccessException;

}
